<MudStack Class="mb-4">
    <MudText Typo="Typo.h6">Filter Mode:</MudText>
    <MudToggleGroup T="DataGridFilterMode" @bind-Value="_filterMode" Color="Color.Primary" SelectionMode="SelectionMode.SingleSelection">
        <MudToggleItem Value="DataGridFilterMode.ColumnFilterRow" Text="Column Filter Row" />
        <MudToggleItem Value="DataGridFilterMode.Simple" Text="Simple" />
        <MudToggleItem Value="DataGridFilterMode.ColumnFilterMenu" Text="Column Filter Menu" />
    </MudToggleGroup>
</MudStack>

<MudDataGrid Items="@_people" Filterable="true" FilterMode="@_filterMode">
    <Columns>
        <PropertyColumn Property="x => x.Name" Title="Name" />
        <PropertyColumn Property="x => x.Age" Title="Age" />
        <PropertyColumn Property="x => x.HiredOn" Title="Hired On" />
    </Columns>
</MudDataGrid>

@code {
    public static string __description__ = @"Test DateOnly filtering in DataGrid with all filter modes";
    public record Model(string Name, int? Age, DateOnly? HiredOn);
    
    private DataGridFilterMode _filterMode = DataGridFilterMode.ColumnFilterRow;
    
    private readonly IEnumerable<Model> _people =
    [
        new("Sam", 56, new DateOnly(2020, 3, 10)),
        new("Alicia", 54, null),
        new("Ira", 27, new DateOnly(2011, 1, 2)),
        new("John", 32, new DateOnly(2022, 6, 15))
    ];
}
